﻿using AirlineBookingSystem.BuildingBlocks.Contracts.EventBusMessage;
using MassTransit;

namespace AirlineBookingSystem.Bookings.Application.Consumers
{
    public class NotificationEventConsumer : IConsumer<NotificationEvent>
    {

        public async Task Consume(ConsumeContext<NotificationEvent> context)
        {
            var notificationEvent = context.Message;
            Console.WriteLine($"Received Notification Event:Recipient={notificationEvent.Reciption}, " +
                $"Message={notificationEvent.Message},Type={notificationEvent.Type}");

            await Task.CompletedTask;
        }
    }
}
